﻿using System;
using System.Collections.Generic;
using Microsoft.EntityFrameworkCore;

namespace FileUploadAPI;

public partial class PzdjyContext : DbContext
{
    public PzdjyContext()
    {
    }

    public PzdjyContext(DbContextOptions<PzdjyContext> options)
        : base(options)
    {
    }

    public virtual DbSet<一注二注电解液记录> 一注二注电解液记录s { get; set; }

    public virtual DbSet<水分测试仪标定记录> 水分测试仪标定记录s { get; set; }

    public virtual DbSet<电解液磁杂测试记录> 电解液磁杂测试记录s { get; set; }

    protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
#warning To protect potentially sensitive information in your connection string, you should move it out of source code. You can avoid scaffolding the connection string by using the Name= syntax to read it from configuration - see https://go.microsoft.com/fwlink/?linkid=2131148. For more guidance on storing connection strings, see https://go.microsoft.com/fwlink/?LinkId=723263.
        => optionsBuilder.UseSqlServer("Server=.;Database=PZDJY;Uid=sa;Pwd=123qwe...;TrustServerCertificate=true;");

    protected override void OnModelCreating(ModelBuilder modelBuilder)
    {
        modelBuilder.Entity<一注二注电解液记录>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PK__一注二注电解液记__3214EC07C4CD0BC5");

            entity.ToTable("一注二注电解液记录");

            entity.Property(e => e.使用日期).HasColumnType("datetime");
            entity.Property(e => e.判定结果)
                .HasMaxLength(200)
                .IsUnicode(false);
            entity.Property(e => e.图片)
                .HasMaxLength(300)
                .IsUnicode(false);
            entity.Property(e => e.工序)
                .HasMaxLength(200)
                .IsUnicode(false);
            entity.Property(e => e.物料编码)
                .HasMaxLength(200)
                .IsUnicode(false);
            entity.Property(e => e.电解液型号)
                .HasMaxLength(200)
                .IsUnicode(false);
        });

        modelBuilder.Entity<水分测试仪标定记录>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PK__水分测试仪标定记__3214EC07126888AB");

            entity.ToTable("水分测试仪标定记录");

            entity.Property(e => e.判定结果)
                .HasMaxLength(100)
                .IsUnicode(false);
            entity.Property(e => e.标定时间).HasColumnType("datetime");
            entity.Property(e => e.测试图片)
                .HasMaxLength(100)
                .IsUnicode(false);
        });

        modelBuilder.Entity<电解液磁杂测试记录>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PK__电解液磁杂测试记__3214EC071EE03EAD");

            entity.ToTable("电解液磁杂测试记录");

            entity.Property(e => e.Ai)
                .HasMaxLength(100)
                .IsUnicode(false);
            entity.Property(e => e.As0)
                .HasMaxLength(100)
                .IsUnicode(false);
            entity.Property(e => e.Ca)
                .HasMaxLength(100)
                .IsUnicode(false);
            entity.Property(e => e.Cd)
                .HasMaxLength(100)
                .IsUnicode(false);
            entity.Property(e => e.Cu)
                .HasMaxLength(100)
                .IsUnicode(false);
            entity.Property(e => e.Fe)
                .HasMaxLength(100)
                .IsUnicode(false);
            entity.Property(e => e.Hg)
                .HasMaxLength(100)
                .IsUnicode(false);
            entity.Property(e => e.HgCr)
                .HasMaxLength(100)
                .IsUnicode(false);
            entity.Property(e => e.K)
                .HasMaxLength(100)
                .IsUnicode(false);
            entity.Property(e => e.Mg)
                .HasMaxLength(100)
                .IsUnicode(false);
            entity.Property(e => e.N100).HasColumnName("n100");
            entity.Property(e => e.N150).HasColumnName("n150");
            entity.Property(e => e.N25).HasColumnName("n25");
            entity.Property(e => e.N50).HasColumnName("n50");
            entity.Property(e => e.Na)
                .HasMaxLength(100)
                .IsUnicode(false);
            entity.Property(e => e.Ni)
                .HasMaxLength(100)
                .IsUnicode(false);
            entity.Property(e => e.Pb)
                .HasMaxLength(100)
                .IsUnicode(false);
            entity.Property(e => e.Zn)
                .HasMaxLength(100)
                .IsUnicode(false);
            entity.Property(e => e.取样图片)
                .HasMaxLength(100)
                .IsUnicode(false);
            entity.Property(e => e.取样时间).HasColumnType("datetime");
            entity.Property(e => e.周期)
                .HasMaxLength(100)
                .IsUnicode(false);
            entity.Property(e => e.工序)
                .HasMaxLength(100)
                .IsUnicode(false);
            entity.Property(e => e.批次号)
                .HasMaxLength(100)
                .IsUnicode(false);
            entity.Property(e => e.物料编码)
                .HasMaxLength(100)
                .IsUnicode(false);
            entity.Property(e => e.电解液图片)
                .HasMaxLength(100)
                .IsUnicode(false);
            entity.Property(e => e.电解液型号)
                .HasMaxLength(100)
                .IsUnicode(false);
        });

        OnModelCreatingPartial(modelBuilder);
    }

    partial void OnModelCreatingPartial(ModelBuilder modelBuilder);
}
